package com.diamond.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.diamond.util.StringUtil;

/**
 * Clientorder entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "clientorder", catalog = "diamond")
public class Clientorder implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -1914562130040335996L;
	private Long cliOrdMasterId;
	private Long userId;
	private String orderNo;
	private String buyerName;
	private String buyerTel;
	private String orderDate;
	private String orderStatus = "0";
	private String delState = "0";
	private String receiveDate;
	private String pickupWay;
	private String orderRemark;
	private String address;
	private Double total;
	private Double midTotal;

	// Constructors

	/** default constructor */
	public Clientorder() {
	}

	/** minimal constructor */
	public Clientorder(String orderNo) {
		this.orderNo = orderNo;
	}

	/** full constructor */
	public Clientorder(Long cliOrdMasterId, Long userId, String orderNo,
			String buyerName, String buyerTel, String orderDate,
			String orderStatus, String delState,String receiveDate, String pickupWay,
			String orderRemark, String address, Double total,Double midTotal) {
		super();
		this.cliOrdMasterId = cliOrdMasterId;
		this.userId = userId;
		this.orderNo = orderNo;
		this.buyerName = buyerName;
		this.buyerTel = buyerTel;
		this.orderDate = orderDate;
		this.orderStatus = orderStatus;
		this.delState = delState;
		this.receiveDate = receiveDate;
		this.pickupWay = pickupWay;
		this.orderRemark = orderRemark;
		this.address = address;
		this.total = total;
		this.midTotal = midTotal;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "cliOrdMaster_id", unique = true, nullable = false)
	public Long getCliOrdMasterId() {
		return this.cliOrdMasterId;
	}

	public void setCliOrdMasterId(Long cliOrdMasterId) {
		this.cliOrdMasterId = cliOrdMasterId;
	}

	@Column(name = "user_id")
	public Long getUserId() {
		return this.userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	@Column(name = "order_no", nullable = false, length = 500)
	public String getOrderNo() {
		return this.orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	@Column(name = "buyer_name", length = 500)
	public String getBuyerName() {
		return this.buyerName;
	}

	public void setBuyerName(String buyerName) {
		this.buyerName = buyerName;
	}

	@Column(name = "buyer_tel", length = 500)
	public String getBuyerTel() {
		return this.buyerTel;
	}

	public void setBuyerTel(String buyerTel) {
		this.buyerTel = buyerTel;
	}

	@Column(name = "order_date", length = 500)
	public String getOrderDate() {
		return this.orderDate;
	}

	public void setOrderDate(String orderDate) {
		this.orderDate = orderDate;
	}

	@Column(name = "order_status", length = 500)
	public String getOrderStatus() {
		return this.orderStatus;
	}

	public void setOrderStatus(String orderStatus) {
		this.orderStatus = orderStatus;
	}
	@Column(name = "del_state", length = 500)
	public String getDelState() {
		return delState;
	}

	public void setDelState(String delState) {
		this.delState = delState;
	}

	@Column(name = "receive_date", length = 500)
	public String getReceiveDate() {
		return this.receiveDate;
	}

	public void setReceiveDate(String receiveDate) {
		this.receiveDate = receiveDate;
	}

	@Column(name = "pickup_way", length = 500)
	public String getPickupWay() {
		return this.pickupWay;
	}

	public void setPickupWay(String pickupWay) {
		this.pickupWay = pickupWay;
	}

	@Column(name = "order_remark", length = 500)
	public String getOrderRemark() {
		return this.orderRemark;
	}

	public void setOrderRemark(String orderRemark) {
		this.orderRemark = orderRemark;
	}
	@Column(name = "address", length = 500)
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	@Column(name = "total")
	public Double getTotal() {
		return StringUtil.doubleFormat(total);
	}

	public void setTotal(Double total) {
		this.total = total;
	}
	@Column(name = "mid_total")
	public Double getMidTotal() {
		return midTotal;
	}

	public void setMidTotal(Double midTotal) {
		this.midTotal = midTotal;
	}
	
	

}